<?php
html::printPath(array(
		'seminar.registrationOverview' => ''
	)
);
$msg->printMessages();
?>

<?php
$elb = new EntityListBuilder($this, $registrationList);
$elb->rowCssClassFunction('cancelledRowClass');
$elb->integer('id')->linkWithValue('/reception/recRegistration/display?id=', 'id')->openInPopup();
$elb->text('person_id')->doubleValue('last_name', 'first_name')->alignLeft()->orderByField('last_name'); //->linkWithValue('/admin/person/display?id=', 'person_id');
$elb->text('idcard_number')->labelKey('person.idcard_number')->valueFunction('registrationHelper::idCardFunction', '/reception/recRegistration/idCardForm');
$elb->text('is_present')->valueFunction('registrationHelper::presenceFunction', '/reception/recRegistration/togglePresence');
$elb->text('key_deposit')->valueFunction('registrationHelper::keyDepositFunction', '/reception/recRegistration/keyDepositForm');
$elb->text('is_key_returned')->valueFunction('registrationHelper::keyReturnedFunction', '/reception/recRegistration/toggleKeyReturned');
// $elb->timestamp('created_at');
// $elb->text('payment_type')->l10n('registration.paymentType-');
// $elb->price('total_price', 'currency_code')->alignRight();
$elb->timestamp('confirmed_at');
$elb->text('confirmed_by_last_name')->labelKey('registration.confirmed_by_id')->doubleValue('confirmed_by_first_name', 'confirmed_by_last_name');
$elb->longText('org_notes');
$elb->write();

function cancelledRowClass($registration) {
	if ($registration['cancelled_at']) {
		return 'cancelledRegRow';
	}
	return '';
}


